package net.maku.events.service;

import net.maku.events.vo.AlreadyAnswerQuestionBankOptionVO;
import net.maku.events.vo.UserAnswerQuestionBankOptionVO;
import net.maku.framework.common.utils.PageResult;
import net.maku.framework.mybatis.service.BaseService;
import net.maku.events.vo.UserContestQuestionOptionVO;
import net.maku.events.query.UserContestQuestionOptionQuery;
import net.maku.events.entity.UserContestQuestionOptionEntity;

import java.util.List;
import java.util.Map;

/**
 * 用户所答竞赛题选项
 *
 * @author 阿沐 babamu@126.com
 * @since 1.0.0 2025-03-22
 */
public interface UserContestQuestionOptionService extends BaseService<UserContestQuestionOptionEntity> {

    PageResult<UserContestQuestionOptionVO> page(UserContestQuestionOptionQuery query);

    /**
     * 用户答题插入选项
     *
     * @param userContestQuestionId 用户答题题目id
     * @param options               选项
     */
    boolean save(Long userContestQuestionId, List<UserAnswerQuestionBankOptionVO> options);

    /**
     * 获取已经答题的题目的项目
     * @param userAnswerQuestionIdList 答题id数组
     * @return 结果
     */
    Map<Long, List<AlreadyAnswerQuestionBankOptionVO>> getAlreadyAnswerOption(List<Long> userAnswerQuestionIdList);
}